#ifndef IMAGEITEM_H
#define IMAGEITEM_H

#include <QtGui>

class ImageItem : public QObject, public QGraphicsItem
{
    Q_OBJECT
    Q_INTERFACES(QGraphicsItem)
public:
    explicit ImageItem(const QString &imgName,
                       const QPoint &leftTop,
                       const QPoint &rightBottom,
                       QGraphicsScene *scene = 0,
                       QGraphicsItem *parent = 0);
    ~ImageItem();

    virtual QRectF boundingRect() const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    static QSize BG_SIZE;

protected:
    QString imageName;
    QPixmap image;
    QSize imageSize;

};

#endif // IMAGEITEM_H
